
(defun isolate-element (list index)
  (let ((element  (elt list index))
        (new-list (append (subseq list 0 index)
                          (subseq list (1+ index)))))
    (list element new-list)))

(defun print-grid (grid)
  (destructuring-bind (width depth) (array-dimensions grid)
    (dotimes (y depth)
      (format t "|")
      (dotimes (x width)
        (format t "~a" (case (aref grid x y)
                         (empty " ")
                         (house "_")
                         (vrijstand "o"))))
      (format t "|~%"))))
